/**
 * Created by wangyang on 2018-12-20.
 * itwangyang@gmail.com
 * http://itwangyang.xyz
 */

/*banner*/
var swiper = new Swiper('.swiper-container', {
    spaceBetween: 30,
    centeredSlides: true,
    autoplay: {
        delay: 2500,
        disableOnInteraction: false,
    },
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },
});


/*显示隐藏*/
function my$(id) {
    return document.getElementById(id);
}
//先获取最外面的div
// var aObj = my$("qq");
// //为a注册鼠标进入
// aObj.onmouseover = function () {
//     my$("QRCodeqq").style.display = "block"
// };
// //为a注册鼠标离开
// aObj.onmouseout = function () {
//     my$("QRCodeqq").style.display = "none"
// };

$(".qq").on('mouseover',function(){
    $(".QRCodeqq").css("display","block");
});

$(".qq").on('mouseout',function(){
    $(".QRCodeqq").css("display","none");
});


$(".weChat").on('mouseover',function(){
    $(".QRCodeWeChat").css("display","block");
});

$(".weChat").on('mouseout',function(){
    $(".QRCodeWeChat").css("display","none");
});

$(document).ready(function(){
    $(".item2-list").mouseover(function(){
        $(".icon_dt").attr("src","images/icon_dt.png");
    });
    $(".item2-list").mouseout(function(){
        $(".icon_dt").attr("src","images/icon_dt_select.png");
    });

    $(".item2-list2").mouseover(function(){
        $(".icon_dt2").attr("src","images/icon_zh.png");
    });
    $(".item2-list2").mouseout(function(){
        $(".icon_dt2").attr("src","images/icon_zh_select.png");
    });

    $(".item2-list3").mouseover(function(){
        $(".icon_dt3").attr("src","images/icon_pm.png");
    });
    $(".item2-list3").mouseout(function(){
        $(".icon_dt3").attr("src","images/icon_pm_select.png");
    });

    $(".item2-list4").mouseover(function(){
        $(".icon_dt4").attr("src","images/icon_sh.png");
    });
    $(".item2-list4").mouseout(function(){
        $(".icon_dt4").attr("src","images/icon_sh_select.png");
    });

    $(".item2-list5").mouseover(function(){
        $(".icon_dt5").attr("src","images/icon_qz.png");
    });
    $(".item2-list5").mouseout(function(){
        $(".icon_dt5").attr("src","images/icon_qz_select.png");
    });


});


$(document).on('click','.float',function () {
    $('body,html').animate({
        scrollTop: 0
    }, 1000);
    return false;
});
/*$(function () {
    $(".float").on("click", function () {
        alert("11");
        $('body,html').animate({
            scrollTop: 0
        }, 1000);
        return false;
    });
});*/

$(function(){
    var m_st, m_po = 400; //滚动到400像素时显示
    $(window).scroll(
        function () {
            m_st = Math.max(document.body.scrollTop || document.documentElement.scrollTop);
            if (m_st > m_po) {
                $('.float').slideDown();//classNmae : tips
            }else{
                $('.float').slideUp();//classNmae : tips
            }
        })
});










